<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
	</body>
	<script type="text/javascript">
		var userAgent = window.navigator.userAgent ; 
		var isIpad = userAgent.indexOf('ipad') >-1;
		var isIphone = userAgent.indexOf('iphone') >-1;
		var isAndroid = userAgent.indexOf('Android') >-1;
		console.log(userAgent);
		
		if (isIpad || isIphone || isAndroid) {
			alert('手机端');
		}else{
			alert('PC端');
		}
	</script>
</html>
